package com.fs.sys.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.Fastjson2TypeHandler;
import com.fs.common.base.domain.entity.BaseEntity;
import com.fs.sys.bean.enums.WorkbenchCmpStatus;
import lombok.Data;

import java.util.Map;

/**
 * 工作台组件
 *
 * @author  LiuQi 2025/6/16-9:24
 * @version V1.0
 **/
@Data
@TableName(value = "sys_workbench_cmp", autoResultMap = true)
public class WorkbenchCmpEntity extends BaseEntity {
    /**
     * 组件编码
     */
    private String code;

    /**
     * 组件分类id
     */
    private String categoryId;

    /**
     * 组件名称
     */
    private String name;

    /**
     * 组件示意图
     */
    private String image;

    /**
     * 组件配置
     */
    @TableField(typeHandler = Fastjson2TypeHandler.class)
    private Map<String, Object> config;

    /**
     * 组件已发布配置
     */
    @TableField(typeHandler = Fastjson2TypeHandler.class)
    private Map<String, Object> publishedConfig;

    /**
     * 组件描述
     */
    private String remark;

    /**
     * 组件使用次数
     */
    private Integer usedCount;

    /**
     * 组件状态
     */
    private WorkbenchCmpStatus status;

    /**
     * 组件排序
     */
    private Double sort;

}
